//
//  Toast.h
//  ToastDemo
//  Created by WTFSSD on 2016/11/23.
//  Copyright © 2016年 WTFSSD. All rights reserved.
//

#import <Foundation/Foundation.h>

#import <UIKit/UIKit.h>

#ifndef ScreenWidth
#define ScreenWidth [UIScreen mainScreen].bounds.size.width
#endif

#ifndef ScreenHeight
#define ScreenHeight [UIScreen mainScreen].bounds.size.height
#endif




typedef NS_ENUM(NSUInteger, AnimationType) {
    /**淡入淡出*/
    AnimationTypeFade       = 1<<0,
    /**移动 上到下*/
    AnimationTypeMoveUTD    = 1<<1,
    /**移动 下到上*/
    AnimationTypeMoveDTU    = 1<<2,
    /**移动 左到右*/
    AnimationTypeMoveLTR    = 1<<3,
    /**移动 右到左*/
    AnimationTypeMoveRTL    = 1<<4,
    
    AnimationTypeDefault    = AnimationTypeFade,
    
};

@interface Toast : NSObject


@property(nonatomic,assign,readonly)NSTimeInterval duration;

@property(nonatomic,strong,readonly)UIColor * textColor;

@property(nonatomic,strong,readonly)UIColor * backgroundColor;

@property(nonatomic,assign,readonly)CGFloat  textFontSize;

@property(nonatomic,assign,readonly)AnimationType aType;

+(instancetype)toast;+(void)makeToast:(void(^)(Toast* toast))block;
@property (NS_NONATOMIC_IOSONLY, readonly, copy) Toast *(^setMsg)(NSString *);
@property (NS_NONATOMIC_IOSONLY, readonly, copy) Toast *(^hiddenAfter)(NSTimeInterval);
@property (NS_NONATOMIC_IOSONLY, readonly, copy) Toast *(^setFontSize)(CGFloat);
@property (NS_NONATOMIC_IOSONLY, readonly, copy) Toast *(^setTextColor)(UIColor *);
@property (NS_NONATOMIC_IOSONLY, readonly, copy) Toast *(^setBackgroundColor)(UIColor *);
@property (NS_NONATOMIC_IOSONLY, readonly, copy) Toast *(^setDistanceButtom)(CGFloat);
@property (NS_NONATOMIC_IOSONLY, readonly, copy) Toast *(^setAnimationDuration)(NSTimeInterval);
@property (NS_NONATOMIC_IOSONLY, readonly, copy) Toast *(^setHiddenComplete)(void (^)());
@property (NS_NONATOMIC_IOSONLY, readonly, copy) Toast *(^show)(AnimationType);






-(Toast*)setMsg:(NSString*)msg;
-(Toast*)hiddenAfter:(NSTimeInterval)time;
-(Toast*)setfontSize:(CGFloat)size;
-(Toast*)settextColor:(UIColor*)aColor;
-(Toast*)setbackgroundColor:(UIColor*)aColor;
-(Toast*)setdistanceButtom:(CGFloat)distance;
-(Toast*)setanimationDuration:(NSTimeInterval)time;
-(Toast*)sethiddenComplete:(void(^)())complete;
-(Toast*)showWith:(AnimationType)type;
@end
